package com.heima.media.controller;

import com.heima.common.dto.ResponseResult;
import com.heima.media.dto.LoginDto;
import com.heima.media.service.IWmUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("login")
public class LoginController {

    @Autowired
    private IWmUserService userService;

    /**
     * 登录
     *
     * @param dto
     * @return
     */
    @PostMapping("in")
    public ResponseResult login(@RequestBody LoginDto dto) {
        return userService.login(dto);
    }
}
